package com.example.vertification.service;

import com.example.vertification.entity.UserShop;
import com.example.vertification.entity.UserStatics;
import com.example.vertification.repository.UserShopRepository;
import com.example.vertification.repository.UserStaticsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserStaticsService {


    private final UserStaticsRepository userStaticsRepository;

    @Autowired
    public UserStaticsService(UserStaticsRepository userStaticsRepository) {
        this.userStaticsRepository = userStaticsRepository;
    }

    public UserStatics getEntityByUid(long uid) {
        return userStaticsRepository.findByUid(uid);
    }


    public UserStatics save(UserStatics e) {
        return userStaticsRepository.save(e);
    }
    public List<UserStatics> findAll() {
        return userStaticsRepository.findAll();
    }

}